package polymorphicTask.perimeterAndArea;

public class Parallelogram extends Diagram {
    private int length;
    private int height;
    private int width;

    public Parallelogram(){}

    public Parallelogram(int length, int height, int width) {
        this.length = length;
        this.height = height;
        this.width = width;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getWeight() {
        return width;
    }

    public void setWeight(int weight) {
        this.width = weight;
    }

    public void perimeter(){
        System.out.println("平行四边形的周长为："+((length+width)*2));
    }
    public void area(){
        System.out.println("平行四边形的面积为："+(length*height));
    }
}
